<#assign className = table.className>
<#assign classNameLower = className?uncap_first>
package ${basepackage}.service.${namespace};

import ${basepackage}.dao.${namespace}.${className}Dao;
import ${basepackage}.entity.${namespace}.${className};
import ${basepackage}.dto.${namespace}.${className}DTO;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

<#include "/java_copyright.include">
@Service
public class ${className}Service {

	@Autowired
	private ${className}Dao ${classNameLower}Dao;

	public void insert(${className} entity) throws Exception{
		${classNameLower}Dao.insert(entity);
	}

	public	void updateById(${className} entity) throws Exception{
		${classNameLower}Dao.updateById(entity);
	}

	public	void deleteById	(${className} entity) throws Exception{
		${classNameLower}Dao.deleteById(entity);
	}

	public	List<${className}> selectPage(${className}DTO query) throws Exception{
		return ${classNameLower}Dao.selectPage(query);
	}

	public	int pageCount(${className}DTO query) throws Exception{
		return ${classNameLower}Dao.pageCount(query);
	}

}
